package com.atguigu.tingshu.user.client;

import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.user.UserInfo;
import com.atguigu.tingshu.model.user.UserPaidTrack;
import com.atguigu.tingshu.user.client.impl.UserInfoDegradeFeignClient;
import com.atguigu.tingshu.vo.user.UserInfoVo;
import com.atguigu.tingshu.vo.user.UserPaidRecordVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-user", fallback = UserInfoDegradeFeignClient.class)
public interface UserInfoFeignClient {
    @GetMapping("api/user/userInfo/isSupportRefund/{orderNo}")
    public Result<Boolean> isSupportRefund(@PathVariable("orderNo")String orderNo);
    @PostMapping("api/user/userInfo/savePaidRecords")
    public Result savePaidRecords(@RequestBody UserPaidRecordVo userPaidRecordVo);
    @PostMapping("api/user/userInfo/saveWxPaidRecords")
    public Result saveWxPaidRecords(@RequestBody UserPaidRecordVo userPaidRecordVo);
    @GetMapping("api/user/userInfo/isBuyAlbum/{albumId}")
    public Result<Boolean> isBuyAlbum(@PathVariable("albumId")Long albumId,
                                      @RequestHeader("token")String token);
    @GetMapping("/api/user/userInfo/getUserInfo/{id}")
    public Result<UserInfoVo> getUserInfo(@PathVariable("id")Long id);

    @GetMapping("/api/user/userInfo/getPaidTrackIds/{userId}/{albumId}")
    public Result<Set<Long>> getPaidTrackIds(@PathVariable("userId")Long userId ,
                                             @PathVariable("albumId")Long albumId);
}